import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

// import i18n from './lang' // Internationalization
import './icons' // icon
import './errorLog' // error log
import './permission' // permission control

import * as filters from './filters' // global filters

// 数据字典 加载文件
import './common/dictionaryData'

/**
 * 移动端单位计算
 */
import './utils/adaptive-version'

// 项目全局数据
import globalData from './common/globalData'
Vue.prototype.GlobalData = globalData

// 项目全局常量管理
import variable from './common/variable'
Vue.prototype.Variable = variable

// 小工具集
import Util from '@/utils/util'
Vue.prototype.Util = Util

// 全局自定义组件
import myComponents from 'components/index.js'
Vue.use(myComponents)

// 控制输入框只能输入正整数指令
import '@/directive/enterNumber'

// sessionStorage 缓存
import us from '@/utils/storage'
Vue.prototype.sStorage = us

// register global utility filters.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
